package com.cuit.eduservice.controller;

import com.cuit.utils.R;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/eduService")
@CrossOrigin //解决跨域
public class EduLoginController {

    //login
    @PostMapping("/login")
    public R login(){
        return R.ok().data("token","admin");
    }

    //info
    @GetMapping("/info")
    public R info(){
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar","https://hor1zon.oss-cn-chengdu.aliyuncs.com/Hor1zon.jpg");
    }
}
